package test02;

import java.util.Arrays;

public class demo01 {
    public static void main(String[] args) {
        int arr[]={10,4,25,31,5,2,6,8,90,13};
        int min=arr[0];
        int max=arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(min>arr[i]){
                min=arr[i];
            }
            if(max<arr[i]){
                max=arr[i];
            }
        }
        System.out.println("数组为:"+ Arrays.toString(arr));
        System.out.println("最小值为:"+min);
        System.out.println("最大值为:"+max);
    }
}
